/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef LOGR_INDEPENDENT_PAGES_H
#define LOGR_INDEPENDENT_PAGES_H

#include <sys/stat.h>
#include <sys/fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <ctype.h>
#include <sys/time.h>
#include <assert.h>
#include <gr_graph_fun.h>

typedef struct _web_independent_page_node {
    int num;
    char * url;
    long naccesses;
    int http_code;
    long sbytes;
    char *mime;
    void *info;
} WebIndependentPageStruct;

typedef struct _web_independent_page_node *WebIndependentPagePtr;

WebIndependentPagePtr
new_web_independent_page_node(void);

void
delete_web_independent_page_node(WebIndependentPagePtr ipn);

void
LOGR_set_ip_num(WebIndependentPagePtr opn,int num);

int
LOGR_get_ip_num(WebIndependentPagePtr opn);

void
LOGR_set_ip_url(WebIndependentPagePtr ipn,char *url);

const char *
LOGR_get_ip_url(WebIndependentPagePtr ipn);

void
LOGR_set_ip_mime(WebIndependentPagePtr ipn,char *mime);

const char *
LOGR_get_ip_mime(WebIndependentPagePtr ipn);

void
LOGR_set_ip_info(WebIndependentPagePtr ipn,void *info);

void *
LOGR_get_ip_info(WebIndependentPagePtr ipn);

void
LOGR_set_ip_naccesses(WebIndependentPagePtr ipn,long num);

long
LOGR_get_ip_naccesses(WebIndependentPagePtr ipn);

void
LOGR_inc_ip_naccesses(WebIndependentPagePtr ipn);

void
LOGR_set_ip_sizebytes(WebIndependentPagePtr ipn,long num);

void
LOGR_add_ip_sizebytes(WebIndependentPagePtr opn,long num);

long
LOGR_get_ip_sizebytes(WebIndependentPagePtr ipn);

void
LOGR_set_ip_http_code(WebIndependentPagePtr ipn,int http_code);

int
LOGR_get_ip_http_code(WebIndependentPagePtr ipn);

int
LOGR_is_access_ip_lower(WebIndependentPagePtr u, WebIndependentPagePtr v);

int
LOGR_is_access_ip_bigger(WebIndependentPagePtr u,WebIndependentPagePtr v);

#endif

